package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BizSalesOrderItemMapper;
import com.ruoyi.system.domain.BizSalesOrderItem;
import com.ruoyi.system.service.IBizSalesOrderItemService;
import com.ruoyi.common.core.text.Convert;

/**
 * 销售订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-18
 */
@Service
public class BizSalesOrderItemServiceImpl implements IBizSalesOrderItemService 
{
    @Autowired
    private BizSalesOrderItemMapper bizSalesOrderItemMapper;

    /**
     * 查询销售订单明细
     * 
     * @param itemId 销售订单明细主键
     * @return 销售订单明细
     */
    @Override
    public BizSalesOrderItem selectBizSalesOrderItemByItemId(Long itemId)
    {
        return bizSalesOrderItemMapper.selectBizSalesOrderItemByItemId(itemId);
    }

    /**
     * 查询销售订单明细列表
     * 
     * @param bizSalesOrderItem 销售订单明细
     * @return 销售订单明细
     */
    @Override
    public List<BizSalesOrderItem> selectBizSalesOrderItemList(BizSalesOrderItem bizSalesOrderItem)
    {
        return bizSalesOrderItemMapper.selectBizSalesOrderItemList(bizSalesOrderItem);
    }

    /**
     * 新增销售订单明细
     * 
     * @param bizSalesOrderItem 销售订单明细
     * @return 结果
     */
    @Override
    public int insertBizSalesOrderItem(BizSalesOrderItem bizSalesOrderItem)
    {
        return bizSalesOrderItemMapper.insertBizSalesOrderItem(bizSalesOrderItem);
    }

    /**
     * 修改销售订单明细
     * 
     * @param bizSalesOrderItem 销售订单明细
     * @return 结果
     */
    @Override
    public int updateBizSalesOrderItem(BizSalesOrderItem bizSalesOrderItem)
    {
        return bizSalesOrderItemMapper.updateBizSalesOrderItem(bizSalesOrderItem);
    }

    /**
     * 批量删除销售订单明细
     * 
     * @param itemIds 需要删除的销售订单明细主键
     * @return 结果
     */
    @Override
    public int deleteBizSalesOrderItemByItemIds(String itemIds)
    {
        return bizSalesOrderItemMapper.deleteBizSalesOrderItemByItemIds(Convert.toStrArray(itemIds));
    }

    /**
     * 删除销售订单明细信息
     * 
     * @param itemId 销售订单明细主键
     * @return 结果
     */
    @Override
    public int deleteBizSalesOrderItemByItemId(Long itemId)
    {
        return bizSalesOrderItemMapper.deleteBizSalesOrderItemByItemId(itemId);
    }
}
